﻿using Prism.Commands;
using Prism.Mvvm;
using Prism.Services.Dialogs;

namespace Metro.Demo.ViewModels
{
	public class UserManagerViewModel : BindableBase
	{
        private readonly IDialogService _dialogService;
        public DelegateCommand AddUserCmd { get; set; }
		public UserManagerViewModel(IDialogService dialogService)
		{
            _dialogService = dialogService;

            AddUserCmd = new DelegateCommand(AddUser);
        }

        private void AddUser()
        {
            _dialogService.ShowDialog("UserEditorDialog", null, result => { /*...*/ });
        }
    }
}
